package com.jt.www.enums.extend;

/**
 * 学校性质
 */
public enum SchoolNatureEnum {
    EDU_03("公办", "edu_03"),
    EDU_04("民办", "edu_04"),
    EDU_05("其他", "edu_05");

    private String msg;
    private String code;

    SchoolNatureEnum(String msg, String code) {
        this.msg = msg;
        this.code = code;
    }

    public static String getMsgByCode(String code) {
        for (SchoolNatureEnum natureEnum : SchoolNatureEnum.values()) {
            if (natureEnum.code.equals(code)) {
                return natureEnum.msg;
            }
        }
        return "其他";
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
